package gui;

import com.jme3.app.state.AbstractAppState;
import com.jme3.app.state.AppStateManager;
import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.screen.Screen;
import de.lessvoid.nifty.screen.ScreenController;
import mygame.DataStore;
import mygame.StateSwitcher;

public class StartScreenController extends AbstractAppState implements ScreenController {
    protected Nifty nifty;
    protected Screen screen;

    public void bind(Nifty nifty, Screen screen) {
        this.nifty = nifty;
        this.screen = screen;
    }

    public void onStartScreen() {}

    public void onEndScreen() {}
    
    public void startGame() {
	nifty.removeScreen(screen.getScreenId());
	StateSwitcher.startNewGame();
    }
    
    public void quitGame() {
        DataStore.app.stop();
    }

    @Override
    public void stateAttached(AppStateManager stateManager) {

    }

    @Override
    public void stateDetached(AppStateManager stateManager) {

    }
}
